package com.yyw.gulimall.product.feign.member;

import com.yyw.common.utils.R;
import com.yyw.gulimall.product.dto.MemFullLaddersDto;
import com.yyw.gulimall.product.vo.supVo.Bounds;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 易煜玮
 * @ClassName SpuCouponFeign.java
 * @Description 积分信息 Feign接口 商品spu积分设置
 * @createTime 2020年11月14日 17:45:00
 */
@FeignClient(value = "gulimall-coupon")
public interface SpuCouponFeign {
    /**
     * 保存 商品spu积分设置 信息
     * @param spuBounds
     * @return
     */
    @RequestMapping("/coupon/spubounds/save")
    public R save(@RequestBody Bounds spuBounds);

    /**
     * 远程调用 保存和SKU相关的信息
     * sms->sms_sku_ladder\sms_sku_full_reduction\sms_member_price
     * @return
     */
    @PostMapping("/feign/skuInfo/saveSkuRelevant")
    @Transactional
    public R saveSkuRelevant(@RequestBody MemFullLaddersDto dto);
}
